package org.zjt.mock.demo.mock.config;

import org.springframework.util.AntPathMatcher;

import java.util.Map;

/**
 * Description:  自定义路径匹配器
 *
 * @author juntao.zhang
 * Date: 2018-06-21 下午4:43
 * @see AntPathMatcher
 */

public class CustomizedAntPathMatcher extends AntPathMatcher{


    @Override
    public boolean match(String pattern, String path){
        boolean match = super.match(pattern.toLowerCase(), path.toLowerCase());
        return  match;
    }


    @Override
    public boolean matchStart(String pattern, String path){
        boolean match = super.match(pattern.toLowerCase(), path.toLowerCase());
        return match;
    }

    @Override
    public Map<String, String> extractUriTemplateVariables(String pattern, String path) {
        Map<String, String> stringStringMap = super.extractUriTemplateVariables(pattern.toLowerCase(), path.toLowerCase());
        return  stringStringMap;
    }
}
